#include <iostream>
using namespace std;

template <typename T>
void Swap(T& left, T& right) {
    T temp = left;
    left = right;
    right = temp;
}

int main(){
    int a1 = 1, a2  =2;
    Swap(a1, a2);
    cout << a1 << " " << a2 << endl;
    char c1 = 'a', c2 = 'b';
    Swap(c1, c2);
    cout << c1 << " " << c2 << endl;
    return 0;
}